<template>
  <!-- 2021.10.21 修改 未提交至git主分支，暂存在weile分子中，等待出现新的用于更新组件的分支后在上传更新 -->
  <div class="comImgStack">
    <div
      class="box"
      :style="{
        height: height + 'px',
      }"
    >
      <el-image
        v-if="img != null && img != undefined && img != ''"
        :style="{
          width: width + 'px',
          height: height + 'px',
        }"
        :src="img"
        :fit="fit"
      ></el-image>
      <div
        v-else
        :style="{
          width: width + 'px',
          height: height + 'px',
          lineHeight: height + 'px',
          fontSize: '100px',
          color: 'rgb(191, 203, 217)',
        }"
      >
        <i class="el-icon-folder-opened"></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "comImgStack",
  props: {
    img: {
      type: String,
      default: "",
    },
    width: {
      type: String,
      default: "100",
    },
    height: {
      type: String,
      default: "100",
    },
    fit: {
      type: String,
      default: "cover",
    },
  },

  components: {},

  directives: {},

  data() {
    return {};
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
</style>